package com.market.plus.core.service;

import java.util.List;

import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.market.plus.core.dto.AlbumDto;
import com.market.plus.core.dto.ParticipantDto;
import com.market.plus.core.dto.RelationshipDto;
import com.market.plus.core.mapping.DTOConfiguration;
import com.market.plus.core.model.MultipartFile;
import com.opm.security.core.service.UserService;

public interface ParticipantService extends UserService{

   List<ParticipantDto> findAll(DTOConfiguration configuration);

   boolean hasUserNameExist(String username);

   boolean hasAlbumNameExist(long participantId, String albumName);

   void register(ParticipantDto participantDto, CommonsMultipartFile avatarFile) throws Exception;

   ParticipantDto findLoginUserName(boolean cache);

   ParticipantDto findId(long participantId);

   List<AlbumDto> getAlbums(String participantGUID);

   String addFileToAlbum(long participantId, AlbumDto album, MultipartFile multipartFile) throws Exception;

   void addNewAlbum(long participantId, AlbumDto album) throws Exception;

   Long addNewRelationship(long participantId, RelationshipDto relationship);

   void removeRelationship(long participantId, long relationshipId);

   void addFriendToRelationship(long participantId, long relationshipId, long friendId);

   void removeFriendFromRelationship(long participantId, long relationshipId, long friendId);

   void requestMakingFriend(long participantId, long friendId);

   List<ParticipantDto> waitingFriends(long participantId);

   List<ParticipantDto> listMyFriends(long participantId);

   List<ParticipantDto> listNotMyFriends(long participantId);

   List<RelationshipDto> listMyRelationship(long participantId);

   List<ParticipantDto> listMyLockedFriends(long participantId);

   List<Long> listMyLockeds(long participantId);

   List<ParticipantDto> filterMyFriends(long participantId, List<Long> excludeIds);

   void acceptFriend(long participantId, long friendId);

   void denyFriends(long participantId, long[] friendIds);

   void lockFriend(long participantId, long friendId);

   void unlockFriend(long participantId, long friendId);

   void udpateNewRelation(long participantId, RelationshipDto relationshipDto) throws Exception;

   boolean hasRealtionshipExist(long participantId, String relationshipName);
}
